package com.gz.dao;

import com.gz.entity.StudentQuestionTagWeights;
import com.gz.vo.StudentQuestionTagWeightsVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

import com.gz.dto.StudentQuestionTagWeightsDto;

/**
 * 学生题目标签权重表(StudentQuestionTagWeights)表数据库访问层
 *
 * @author jhk
 * @since 2024-09-11 20:55:57
 */
public interface StudentQuestionTagWeightsMapper {
    /**
     * 通过ID查询单条数据
     *
     * @param studentId 主键
     * @return 实例对象
     */
    List<StudentQuestionTagWeights> queryByStId(Integer studentId);

    /**
     * 通过ID查询单条数据
     *
     * @param id 主键
     * @return 实例对象
     */
    StudentQuestionTagWeights queryById(Integer id);

    /**
     * 查询指定行数据
     *
     * @param studentQuestionTagWeightsDto 查询条件
     * @return 对象列表
     */
    List<StudentQuestionTagWeights> queryAllByLimit(StudentQuestionTagWeightsDto studentQuestionTagWeightsDto);

    /**
     * 查询指定行数据
     *
     * @param studentQuestionTagWeightsDto 查询条件
     * @return 对象列表
     */
    List<StudentQuestionTagWeights> queryAll(StudentQuestionTagWeightsDto studentQuestionTagWeightsDto);
    /**
     * 查询指定行数据
     *
     * @param studentQuestionTagWeightsDto 查询条件
     * @return 对象列表
     */
    List<StudentQuestionTagWeightsVO> queryStuWeitsByPage(StudentQuestionTagWeightsDto studentQuestionTagWeightsDto);

    /**
     * 统计总行数
     *
     * @param studentQuestionTagWeights 查询条件
     * @return 总行数
     */
    long count(StudentQuestionTagWeights studentQuestionTagWeights);

    /**
     * 新增数据
     *
     * @param studentQuestionTagWeights 实例对象
     * @return 影响行数
     */
    int insert(StudentQuestionTagWeights studentQuestionTagWeights);

    /**
     * 新增数据
     *
     * @param studentQuestionTagWeights 实例对象
     * @return 影响行数
     */
    int insertSelective(StudentQuestionTagWeights studentQuestionTagWeights);


    /**
     * 批量新增数据（MyBatis原生foreach方法）
     *
     * @param entities List<StudentQuestionTagWeights> 实例对象列表
     * @return 影响行数
     */
    int insertBatch(@Param("entities") List<StudentQuestionTagWeights> entities);

    /**
     * 批量新增或按主键更新数据（MyBatis原生foreach方法）
     *
     * @param entities List<StudentQuestionTagWeights> 实例对象列表
     * @return 影响行数
     * @throws org.springframework.jdbc.BadSqlGrammarException 入参是空List的时候会抛SQL语句错误的异常，请自行校验入参
     */
    int insertOrUpdateBatch(@Param("entities") List<StudentQuestionTagWeights> entities);

    /**
     * 修改数据
     *
     * @param studentQuestionTagWeights 实例对象
     * @return 影响行数
     */
    int update(StudentQuestionTagWeights studentQuestionTagWeights);

    /**
     * 修改数据
     *
     * @param entities 实例对象
     * @return 影响行数
     */
    int updateBatchSelective(@Param("entities") List<StudentQuestionTagWeights> entities);

    /**
     * 通过主键删除数据
     *
     * @param id 主键
     * @return 影响行数
     */
    int deleteById(Integer id);

}

